package
{
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	
	import test.BinPackTest;

	[SWF(width='1200', height='750', backgroundColor='#232323', frameRate='60')]
	public class SpriteSheetPacker extends Sprite
	{
		public function SpriteSheetPacker()
		{
			super();
			if(this.stage){
				this.init();
			}else{
				this.addEventListener(Event.ADDED_TO_STAGE, init);
			}
		}
		
		private function init(evt:Event=null):void{
			if( evt != null ){
				this.removeEventListener(Event.ADDED_TO_STAGE, init);
			}
			stage.scaleMode = StageScaleMode.SHOW_ALL;
			stage.align = StageAlign.TOP_LEFT;
			this.addChild(new BinPackTest());
		}
	}
}